package com.xiehua.task.dto;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.UUID;

public class Job implements Serializable {

    private static final long serialVersionUID = 1L;

    protected String topic;

    protected String jobId;//Job的唯一标识。用来检索和删除指定的Job信息。

    protected Long delay;//Job需要延迟的时间。单位：秒。（服务端会将其转换为绝对时间）

    protected String reqId = UUID.randomUUID().toString().replace("-","");//每个任务注册到task_server时,对应一个请求id

    protected String createTime;//创建时间

    protected String updateTime;//修改时间

    protected com.xiehua.task.job.pool.Job.JobType type;//任务类型

    protected com.xiehua.task.job.pool.Job.JobStatus status;

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public String getJobId() {
        return jobId;
    }

    public void setJobId(String jobId) {
        this.jobId = jobId;
    }

    public Long getDelay() {
        return delay;
    }

    public void setDelay(Long delay) {
        this.delay = delay;
    }

    public String getReqId() {
        return reqId;
    }

    public void setReqId(String reqId) {
        this.reqId = reqId;
    }

    public com.xiehua.task.job.pool.Job.JobType getType() {
        return type;
    }

    public void setType(com.xiehua.task.job.pool.Job.JobType type) {
        this.type = type;
    }

    public com.xiehua.task.job.pool.Job.JobStatus getStatus() {
        return status;
    }

    public void setStatus(com.xiehua.task.job.pool.Job.JobStatus status) {
        this.status = status;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }
}
